package com.cmit.upay.monitor.util;

import java.util.HashMap;
import java.util.Map;

/**
 * <br/>
 *
 * @author liyuanchang
 * @version V1.0
 * @email liyuanchang@chinamobile.com
 * @date 2020-03-12 09:51
 */
public class StringUtils {
    /**
     * 将JolokiaQueues中的objectName转换成
     * @param objectNameStr
     * @return
     */
    public static Map<String, String> objectNameToMap(String objectNameStr) {
        Map<String, String> map = new HashMap<>();
        String[] split = objectNameStr.split(",");
        for (String s : split) {
            String[] entry = s.split("=");
            map.put(entry[0], entry[1]);
        }
        return map;
    }
}
